// 封装请求函数
import request from '@/utils/request'
// import axios from 'axios'

// 注册 - obj是形参对象
export const register = obj => request.post('/user/register', obj)

// 登录
export const login = obj => request.post('/user/login', obj)

// async fn() {
//  return await axios.get('/user/login',{username: 'zs', age: 18})
// }
// const 11 = function () {
//    return request.get('/从哪发请求', 发的内容是什么(xx变量))
// }

// 获取用户信息
export const getUserInfo = () => {
  return request('/user/currentUser')
}
